From 9b37f5a45ffc812b9a944eed9eeee910ead95a8f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 5 Nov 2017 00:04:23 +0100 Subject: [PATCH] gtk-demo: Update cursors demo It's all glade-ified, hurray! It also now properly tests image cursors, named cursors and fallbacks. I'm not gonna tell how many bugs I found though. --- demos/gtk-demo/cursors.c | 144 +- demos/gtk-demo/cursors.ui | 2838 ++++++++++++++++++++++++++++ demos/gtk-demo/demo.gresource.xml | 2 + demos/gtk-demo/gtk_logo_cursor.png | Bin 0 -> 1414 bytes 4 files changed, 2853 insertions(+), 131 deletions(-) create mode 100644 demos/gtk-demo/cursors.ui create mode 100644 demos/gtk-demo/gtk_logo_cursor.png diff --git a/demos/gtk-demo/cursors.c b/demos/gtk-demo/cursors.c index d6848192c2..39bf801480 100644 --- a/demos/gtk-demo/cursors.c +++ b/demos/gtk-demo/cursors.c @@ -2,158 +2,40 @@ * * Demonstrates a useful set of available cursors. */ -#include - -static void -set_cursor (GtkWidget *button, gpointer data) -{ - GtkWidget *toplevel; - GdkCursor *cursor = data; - GdkWindow *window; - - toplevel = gtk_widget_get_toplevel (button); - window = gtk_widget_get_window (toplevel); - gdk_window_set_cursor (window, cursor); -} - -static GtkWidget * -add_section (GtkWidget *box, - const gchar *heading) -{ - GtkWidget *label; - GtkWidget *section; - label = gtk_label_new (heading); - gtk_label_set_xalign (GTK_LABEL (label), 0.0); - gtk_widget_set_margin_top (label, 10); - gtk_widget_set_margin_bottom (label, 10); - gtk_box_pack_start (GTK_BOX (box), label); - section = gtk_flow_box_new (); - gtk_widget_set_halign (section, GTK_ALIGN_START); - gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (section), GTK_SELECTION_NONE); - gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (section), 2); - gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (section), 20); - gtk_box_pack_start (GTK_BOX (box), section); +#include - return section; -} +static GtkWidget *window = NULL; static void -add_button (GtkWidget *section, - const gchar *css_name) +on_destroy (gpointer data) { - GtkWidget *image, *button; - GdkCursor *cursor; - - cursor = gdk_cursor_new_from_name (css_name, NULL); - if (cursor == NULL) - image = gtk_image_new_from_icon_name ("image-missing", GTK_ICON_SIZE_MENU); - else - { - gchar *path; - - path = g_strdup_printf ("/cursors/%s_cursor.png", css_name); - g_strdelimit (path, "-", '_'); - image = gtk_image_new_from_resource (path); - g_free (path); - } - gtk_widget_set_size_request (image, 32, 32); - button = gtk_button_new (); - gtk_container_add (GTK_CONTAINER (button), image); - gtk_style_context_add_class (gtk_widget_get_style_context (button), "image-button"); - g_signal_connect (button, "clicked", G_CALLBACK (set_cursor), cursor); - - gtk_widget_set_tooltip_text (button, css_name); - gtk_container_add (GTK_CONTAINER (section), button); + window = NULL; } GtkWidget * do_cursors (GtkWidget *do_widget) { - static GtkWidget *window = NULL; - if (!window) { - GtkWidget *sw; - GtkWidget *box; - GtkWidget *section; + GtkBuilder *builder; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + builder = gtk_builder_new_from_resource ("/cursors/cursors.ui"); + gtk_builder_connect_signals (builder, NULL); + window = GTK_WIDGET (gtk_builder_get_object (builder, "window")); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); - gtk_window_set_title (GTK_WINDOW (window), "Cursors"); - gtk_window_set_default_size (GTK_WINDOW (window), 500, 500); - g_signal_connect (window, "destroy", - G_CALLBACK (gtk_widget_destroyed), - &window); - - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - gtk_container_add (GTK_CONTAINER (window), sw); - box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - g_object_set (box, - "margin-start", 20, - "margin-end", 20, - "margin-bottom", 10, - NULL); - gtk_container_add (GTK_CONTAINER (sw), box); - - section = add_section (box, "General"); - add_button (section, "default"); - add_button (section, "none"); - - section = add_section (box, "Link & Status"); - add_button (section, "context-menu"); - add_button (section, "help"); - add_button (section, "pointer"); - add_button (section, "progress"); - add_button (section, "wait"); - - section = add_section (box, "Selection"); - add_button (section, "cell"); - add_button (section, "crosshair"); - add_button (section, "text"); - add_button (section, "vertical-text"); - - section = add_section (box, "Drag & Drop"); - add_button (section, "alias"); - add_button (section, "copy"); - add_button (section, "move"); - add_button (section, "no-drop"); - add_button (section, "not-allowed"); - add_button (section, "grab"); - add_button (section, "grabbing"); - - section = add_section (box, "Resize & Scrolling"); - add_button (section, "all-scroll"); - add_button (section, "col-resize"); - add_button (section, "row-resize"); - add_button (section, "n-resize"); - add_button (section, "e-resize"); - add_button (section, "s-resize"); - add_button (section, "w-resize"); - add_button (section, "ne-resize"); - add_button (section, "nw-resize"); - add_button (section, "se-resize"); - add_button (section, "sw-resize"); - add_button (section, "ew-resize"); - add_button (section, "ns-resize"); - add_button (section, "nesw-resize"); - add_button (section, "nwse-resize"); - - section = add_section (box, "Zoom"); - add_button (section, "zoom-in"); - add_button (section, "zoom-out"); + G_CALLBACK (on_destroy), NULL); + g_object_set_data_full (G_OBJECT (window), "builder", builder, g_object_unref); } if (!gtk_widget_get_visible (window)) gtk_widget_show (window); else - gtk_widget_destroy (window); - + { + gtk_widget_destroy (window); + } return window; } diff --git a/demos/gtk-demo/cursors.ui b/demos/gtk-demo/cursors.ui new file mode 100644 index 0000000000..df2a030790 --- /dev/null +++ b/demos/gtk-demo/cursors.ui @@ -0,0 +1,2838 @@ + + + + + default + + + resource:///cursors/default_cursor.png + 5 + 5 + + + default + default_cursor_image + + + resource:///cursors/default_cursor.png + 5 + 5 + default_cursor + + + none + + + resource:///cursors/none_cursor.png + 0 + 0 + + + none + none_cursor_image + + + resource:///cursors/none_cursor.png + 0 + 0 + none_cursor + + + gtk-logo + + + resource:///cursors/gtk_logo_cursor.png + 18 + 2 + + + gtk-logo + gtk-logo_cursor_image + + + resource:///cursors/gtk_logo_cursor.png + 18 + 2 + gtk-logo_cursor + + + context-menu + + + resource:///cursors/context_menu_cursor.png + 5 + 5 + + + context-menu + context-menu_cursor_image + + + resource:///cursors/context_menu_cursor.png + 5 + 5 + context-menu_cursor + + + help + + + resource:///cursors/help_cursor.png + 16 + 27 + + + help + help_cursor_image + + + resource:///cursors/help_cursor.png + 16 + 27 + help_cursor + + + pointer + + + resource:///cursors/pointer_cursor.png + 14 + 9 + + + pointer + pointer_cursor_image + + + resource:///cursors/pointer_cursor.png + 14 + 9 + pointer_cursor + + + progress + + + resource:///cursors/progress_cursor.png + 5 + 4 + + + progress + progress_cursor_image + + + resource:///cursors/progress_cursor.png + 5 + 4 + progress_cursor + + + wait + + + resource:///cursors/wait_cursor.png + 11 + 11 + + + wait + wait_cursor_image + + + resource:///cursors/wait_cursor.png + 11 + 11 + wait_cursor + + + cell + + + resource:///cursors/cell_cursor.png + 15 + 15 + + + cell + cell_cursor_image + + + resource:///cursors/cell_cursor.png + 15 + 15 + cell_cursor + + + crosshair + + + resource:///cursors/crosshair_cursor.png + 15 + 15 + + + crosshair + crosshair_cursor_image + + + resource:///cursors/crosshair_cursor.png + 15 + 15 + crosshair_cursor + + + text + + + resource:///cursors/text_cursor.png + 14 + 15 + + + text + text_cursor_image + + + resource:///cursors/text_cursor.png + 14 + 15 + text_cursor + + + vertical-text + + + resource:///cursors/vertical_text_cursor.png + 16 + 15 + + + vertical-text + vertical-text_cursor_image + + + resource:///cursors/vertical_text_cursor.png + 16 + 15 + vertical-text_cursor + + + alias + + + resource:///cursors/alias_cursor.png + 12 + 11 + + + alias + alias_cursor_image + + + resource:///cursors/alias_cursor.png + 12 + 11 + alias_cursor + + + copy + + + resource:///cursors/copy_cursor.png + 12 + 11 + + + copy + copy_cursor_image + + + resource:///cursors/copy_cursor.png + 12 + 11 + copy_cursor + + + move + + + resource:///cursors/move_cursor.png + 12 + 11 + + + move + move_cursor_image + + + resource:///cursors/move_cursor.png + 12 + 11 + move_cursor + + + no-drop + + + resource:///cursors/no_drop_cursor.png + 12 + 11 + + + no-drop + no-drop_cursor_image + + + resource:///cursors/no_drop_cursor.png + 12 + 11 + no-drop_cursor + + + not-allowed + + + resource:///cursors/not_allowed_cursor.png + 12 + 11 + + + not-allowed + not-allowed_cursor_image + + + resource:///cursors/not_allowed_cursor.png + 12 + 11 + not-allowed_cursor + + + grab + + + resource:///cursors/grab_cursor.png + 10 + 6 + + + grab + grab_cursor_image + + + resource:///cursors/grab_cursor.png + 10 + 6 + grab_cursor + + + grabbing + + + resource:///cursors/grabbing_cursor.png + 15 + 14 + + + grabbing + grabbing_cursor_image + + + resource:///cursors/grabbing_cursor.png + 15 + 14 + grabbing_cursor + + + all-scroll + + + resource:///cursors/all_scroll_cursor.png + 15 + 15 + + + all-scroll + all-scroll_cursor_image + + + resource:///cursors/all_scroll_cursor.png + 15 + 15 + all-scroll_cursor + + + col-resize + + + resource:///cursors/col_resize_cursor.png + 16 + 15 + + + col-resize + col-resize_cursor_image + + + resource:///cursors/col_resize_cursor.png + 16 + 15 + col-resize_cursor + + + row-resize + + + resource:///cursors/row_resize_cursor.png + 15 + 17 + + + row-resize + row-resize_cursor_image + + + resource:///cursors/row_resize_cursor.png + 15 + 17 + row-resize_cursor + + + n-resize + + + resource:///cursors/n_resize_cursor.png + 17 + 7 + + + n-resize + n-resize_cursor_image + + + resource:///cursors/n_resize_cursor.png + 17 + 7 + n-resize_cursor + + + e-resize + + + resource:///cursors/e_resize_cursor.png + 25 + 17 + + + e-resize + e-resize_cursor_image + + + resource:///cursors/e_resize_cursor.png + 25 + 17 + e-resize_cursor + + + s-resize + + + resource:///cursors/s_resize_cursor.png + 17 + 23 + + + s-resize + s-resize_cursor_image + + + resource:///cursors/s_resize_cursor.png + 17 + 23 + s-resize_cursor + + + w-resize + + + resource:///cursors/w_resize_cursor.png + 8 + 17 + + + w-resize + w-resize_cursor_image + + + resource:///cursors/w_resize_cursor.png + 8 + 17 + w-resize_cursor + + + ne-resize + + + resource:///cursors/ne_resize_cursor.png + 20 + 13 + + + ne-resize + ne-resize_cursor_image + + + resource:///cursors/ne_resize_cursor.png + 20 + 13 + ne-resize_cursor + + + nw-resize + + + resource:///cursors/nw_resize_cursor.png + 13 + 13 + + + nw-resize + nw-resize_cursor_image + + + resource:///cursors/nw_resize_cursor.png + 13 + 13 + nw-resize_cursor + + + se-resize + + + resource:///cursors/se_resize_cursor.png + 19 + 19 + + + se-resize + se-resize_cursor_image + + + resource:///cursors/se_resize_cursor.png + 19 + 19 + se-resize_cursor + + + sw-resize + + + resource:///cursors/sw_resize_cursor.png + 13 + 19 + + + sw-resize + sw-resize_cursor_image + + + resource:///cursors/sw_resize_cursor.png + 13 + 19 + sw-resize_cursor + + + ew-resize + + + resource:///cursors/ew_resize_cursor.png + 16 + 15 + + + ew-resize + ew-resize_cursor_image + + + resource:///cursors/ew_resize_cursor.png + 16 + 15 + ew-resize_cursor + + + ns-resize + + + resource:///cursors/ns_resize_cursor.png + 15 + 17 + + + ns-resize + ns-resize_cursor_image + + + resource:///cursors/ns_resize_cursor.png + 15 + 17 + ns-resize_cursor + + + nesw-resize + + + resource:///cursors/nesw_resize_cursor.png + 14 + 14 + + + nesw-resize + nesw-resize_cursor_image + + + resource:///cursors/nesw_resize_cursor.png + 14 + 14 + nesw-resize_cursor + + + nwse-resize + + + resource:///cursors/nwse_resize_cursor.png + 14 + 14 + + + nwse-resize + nwse-resize_cursor_image + + + resource:///cursors/nwse_resize_cursor.png + 14 + 14 + nwse-resize_cursor + + + zoom-in + + + resource:///cursors/zoom_in_cursor.png + 14 + 13 + + + zoom-in + zoom-in_cursor_image + + + resource:///cursors/zoom_in_cursor.png + 14 + 13 + zoom-in_cursor + + + zoom-out + + + resource:///cursors/zoom_out_cursor.png + 14 + 13 + + + zoom-out + zoom-out_cursor_image + + + resource:///cursors/zoom_out_cursor.png + 14 + 13 + zoom-out_cursor + + + 300 + 300 + Cursors + + + never + automatic + True + True + + + vertical + 60 + 10 + center + + + + + none + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/default_cursor.png + + + + + default + start + baseline + 0.0 + True + + + + + 32 + 32 + default_cursor + The "default" named cursor. + + + + + 32 + 32 + default_cursor_image + An image cursor. + + + + + 32 + 32 + default_cursor_fallback + The "default" named cursor falling back to an image cursor. + + + + + 32 + 32 + default_cursor_image_fallback + An image cursor falling back to the "default" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/none_cursor.png + + + + + none + start + baseline + 0.0 + True + + + + + 32 + 32 + none_cursor + The "none" named cursor. + + + + + 32 + 32 + none_cursor_image + An image cursor. + + + + + 32 + 32 + none_cursor_fallback + The "none" named cursor falling back to an image cursor. + + + + + 32 + 32 + none_cursor_image_fallback + An image cursor falling back to the "none" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/gtk_logo_cursor.png + + + + + gtk-logo + start + baseline + 0.0 + True + + + + + 32 + 32 + gtk-logo_cursor + The "gtk-logo" named cursor. + + + + + 32 + 32 + gtk-logo_cursor_image + An image cursor. + + + + + 32 + 32 + gtk-logo_cursor_fallback + The "gtk-logo" named cursor falling back to an image cursor. + + + + + 32 + 32 + gtk-logo_cursor_image_fallback + An image cursor falling back to the "gtk-logo" cursor. + + + + + + + + + + + + + True + + + none + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/context_menu_cursor.png + + + + + context-menu + start + baseline + 0.0 + True + + + + + 32 + 32 + context-menu_cursor + The "context-menu" named cursor. + + + + + 32 + 32 + context-menu_cursor_image + An image cursor. + + + + + 32 + 32 + context-menu_cursor_fallback + The "context-menu" named cursor falling back to an image cursor. + + + + + 32 + 32 + context-menu_cursor_image_fallback + An image cursor falling back to the "context-menu" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/help_cursor.png + + + + + help + start + baseline + 0.0 + True + + + + + 32 + 32 + help_cursor + The "help" named cursor. + + + + + 32 + 32 + help_cursor_image + An image cursor. + + + + + 32 + 32 + help_cursor_fallback + The "help" named cursor falling back to an image cursor. + + + + + 32 + 32 + help_cursor_image_fallback + An image cursor falling back to the "help" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/pointer_cursor.png + + + + + pointer + start + baseline + 0.0 + True + + + + + 32 + 32 + pointer_cursor + The "pointer" named cursor. + + + + + 32 + 32 + pointer_cursor_image + An image cursor. + + + + + 32 + 32 + pointer_cursor_fallback + The "pointer" named cursor falling back to an image cursor. + + + + + 32 + 32 + pointer_cursor_image_fallback + An image cursor falling back to the "pointer" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/progress_cursor.png + + + + + progress + start + baseline + 0.0 + True + + + + + 32 + 32 + progress_cursor + The "progress" named cursor. + + + + + 32 + 32 + progress_cursor_image + An image cursor. + + + + + 32 + 32 + progress_cursor_fallback + The "progress" named cursor falling back to an image cursor. + + + + + 32 + 32 + progress_cursor_image_fallback + An image cursor falling back to the "progress" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/wait_cursor.png + + + + + wait + start + baseline + 0.0 + True + + + + + 32 + 32 + wait_cursor + The "wait" named cursor. + + + + + 32 + 32 + wait_cursor_image + An image cursor. + + + + + 32 + 32 + wait_cursor_fallback + The "wait" named cursor falling back to an image cursor. + + + + + 32 + 32 + wait_cursor_image_fallback + An image cursor falling back to the "wait" cursor. + + + + + + + + + + + + + True + + + none + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/cell_cursor.png + + + + + cell + start + baseline + 0.0 + True + + + + + 32 + 32 + cell_cursor + The "cell" named cursor. + + + + + 32 + 32 + cell_cursor_image + An image cursor. + + + + + 32 + 32 + cell_cursor_fallback + The "cell" named cursor falling back to an image cursor. + + + + + 32 + 32 + cell_cursor_image_fallback + An image cursor falling back to the "cell" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/crosshair_cursor.png + + + + + crosshair + start + baseline + 0.0 + True + + + + + 32 + 32 + crosshair_cursor + The "crosshair" named cursor. + + + + + 32 + 32 + crosshair_cursor_image + An image cursor. + + + + + 32 + 32 + crosshair_cursor_fallback + The "crosshair" named cursor falling back to an image cursor. + + + + + 32 + 32 + crosshair_cursor_image_fallback + An image cursor falling back to the "crosshair" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/text_cursor.png + + + + + text + start + baseline + 0.0 + True + + + + + 32 + 32 + text_cursor + The "text" named cursor. + + + + + 32 + 32 + text_cursor_image + An image cursor. + + + + + 32 + 32 + text_cursor_fallback + The "text" named cursor falling back to an image cursor. + + + + + 32 + 32 + text_cursor_image_fallback + An image cursor falling back to the "text" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/vertical_text_cursor.png + + + + + vertical-text + start + baseline + 0.0 + True + + + + + 32 + 32 + vertical-text_cursor + The "vertical-text" named cursor. + + + + + 32 + 32 + vertical-text_cursor_image + An image cursor. + + + + + 32 + 32 + vertical-text_cursor_fallback + The "vertical-text" named cursor falling back to an image cursor. + + + + + 32 + 32 + vertical-text_cursor_image_fallback + An image cursor falling back to the "vertical-text" cursor. + + + + + + + + + + + + + True + + + none + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/alias_cursor.png + + + + + alias + start + baseline + 0.0 + True + + + + + 32 + 32 + alias_cursor + The "alias" named cursor. + + + + + 32 + 32 + alias_cursor_image + An image cursor. + + + + + 32 + 32 + alias_cursor_fallback + The "alias" named cursor falling back to an image cursor. + + + + + 32 + 32 + alias_cursor_image_fallback + An image cursor falling back to the "alias" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/copy_cursor.png + + + + + copy + start + baseline + 0.0 + True + + + + + 32 + 32 + copy_cursor + The "copy" named cursor. + + + + + 32 + 32 + copy_cursor_image + An image cursor. + + + + + 32 + 32 + copy_cursor_fallback + The "copy" named cursor falling back to an image cursor. + + + + + 32 + 32 + copy_cursor_image_fallback + An image cursor falling back to the "copy" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/move_cursor.png + + + + + move + start + baseline + 0.0 + True + + + + + 32 + 32 + move_cursor + The "move" named cursor. + + + + + 32 + 32 + move_cursor_image + An image cursor. + + + + + 32 + 32 + move_cursor_fallback + The "move" named cursor falling back to an image cursor. + + + + + 32 + 32 + move_cursor_image_fallback + An image cursor falling back to the "move" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/no_drop_cursor.png + + + + + no-drop + start + baseline + 0.0 + True + + + + + 32 + 32 + no-drop_cursor + The "no-drop" named cursor. + + + + + 32 + 32 + no-drop_cursor_image + An image cursor. + + + + + 32 + 32 + no-drop_cursor_fallback + The "no-drop" named cursor falling back to an image cursor. + + + + + 32 + 32 + no-drop_cursor_image_fallback + An image cursor falling back to the "no-drop" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/not_allowed_cursor.png + + + + + not-allowed + start + baseline + 0.0 + True + + + + + 32 + 32 + not-allowed_cursor + The "not-allowed" named cursor. + + + + + 32 + 32 + not-allowed_cursor_image + An image cursor. + + + + + 32 + 32 + not-allowed_cursor_fallback + The "not-allowed" named cursor falling back to an image cursor. + + + + + 32 + 32 + not-allowed_cursor_image_fallback + An image cursor falling back to the "not-allowed" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/grab_cursor.png + + + + + grab + start + baseline + 0.0 + True + + + + + 32 + 32 + grab_cursor + The "grab" named cursor. + + + + + 32 + 32 + grab_cursor_image + An image cursor. + + + + + 32 + 32 + grab_cursor_fallback + The "grab" named cursor falling back to an image cursor. + + + + + 32 + 32 + grab_cursor_image_fallback + An image cursor falling back to the "grab" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/grabbing_cursor.png + + + + + grabbing + start + baseline + 0.0 + True + + + + + 32 + 32 + grabbing_cursor + The "grabbing" named cursor. + + + + + 32 + 32 + grabbing_cursor_image + An image cursor. + + + + + 32 + 32 + grabbing_cursor_fallback + The "grabbing" named cursor falling back to an image cursor. + + + + + 32 + 32 + grabbing_cursor_image_fallback + An image cursor falling back to the "grabbing" cursor. + + + + + + + + + + + + + True + + + none + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/all_scroll_cursor.png + + + + + all-scroll + start + baseline + 0.0 + True + + + + + 32 + 32 + all-scroll_cursor + The "all-scroll" named cursor. + + + + + 32 + 32 + all-scroll_cursor_image + An image cursor. + + + + + 32 + 32 + all-scroll_cursor_fallback + The "all-scroll" named cursor falling back to an image cursor. + + + + + 32 + 32 + all-scroll_cursor_image_fallback + An image cursor falling back to the "all-scroll" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/col_resize_cursor.png + + + + + col-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + col-resize_cursor + The "col-resize" named cursor. + + + + + 32 + 32 + col-resize_cursor_image + An image cursor. + + + + + 32 + 32 + col-resize_cursor_fallback + The "col-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + col-resize_cursor_image_fallback + An image cursor falling back to the "col-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/row_resize_cursor.png + + + + + row-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + row-resize_cursor + The "row-resize" named cursor. + + + + + 32 + 32 + row-resize_cursor_image + An image cursor. + + + + + 32 + 32 + row-resize_cursor_fallback + The "row-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + row-resize_cursor_image_fallback + An image cursor falling back to the "row-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/n_resize_cursor.png + + + + + n-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + n-resize_cursor + The "n-resize" named cursor. + + + + + 32 + 32 + n-resize_cursor_image + An image cursor. + + + + + 32 + 32 + n-resize_cursor_fallback + The "n-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + n-resize_cursor_image_fallback + An image cursor falling back to the "n-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/e_resize_cursor.png + + + + + e-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + e-resize_cursor + The "e-resize" named cursor. + + + + + 32 + 32 + e-resize_cursor_image + An image cursor. + + + + + 32 + 32 + e-resize_cursor_fallback + The "e-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + e-resize_cursor_image_fallback + An image cursor falling back to the "e-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/s_resize_cursor.png + + + + + s-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + s-resize_cursor + The "s-resize" named cursor. + + + + + 32 + 32 + s-resize_cursor_image + An image cursor. + + + + + 32 + 32 + s-resize_cursor_fallback + The "s-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + s-resize_cursor_image_fallback + An image cursor falling back to the "s-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/w_resize_cursor.png + + + + + w-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + w-resize_cursor + The "w-resize" named cursor. + + + + + 32 + 32 + w-resize_cursor_image + An image cursor. + + + + + 32 + 32 + w-resize_cursor_fallback + The "w-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + w-resize_cursor_image_fallback + An image cursor falling back to the "w-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/ne_resize_cursor.png + + + + + ne-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + ne-resize_cursor + The "ne-resize" named cursor. + + + + + 32 + 32 + ne-resize_cursor_image + An image cursor. + + + + + 32 + 32 + ne-resize_cursor_fallback + The "ne-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + ne-resize_cursor_image_fallback + An image cursor falling back to the "ne-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/nw_resize_cursor.png + + + + + nw-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + nw-resize_cursor + The "nw-resize" named cursor. + + + + + 32 + 32 + nw-resize_cursor_image + An image cursor. + + + + + 32 + 32 + nw-resize_cursor_fallback + The "nw-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + nw-resize_cursor_image_fallback + An image cursor falling back to the "nw-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/sw_resize_cursor.png + + + + + sw-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + sw-resize_cursor + The "sw-resize" named cursor. + + + + + 32 + 32 + sw-resize_cursor_image + An image cursor. + + + + + 32 + 32 + sw-resize_cursor_fallback + The "sw-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + sw-resize_cursor_image_fallback + An image cursor falling back to the "sw-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/se_resize_cursor.png + + + + + se-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + se-resize_cursor + The "se-resize" named cursor. + + + + + 32 + 32 + se-resize_cursor_image + An image cursor. + + + + + 32 + 32 + se-resize_cursor_fallback + The "se-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + se-resize_cursor_image_fallback + An image cursor falling back to the "se-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/ew_resize_cursor.png + + + + + ew-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + ew-resize_cursor + The "ew-resize" named cursor. + + + + + 32 + 32 + ew-resize_cursor_image + An image cursor. + + + + + 32 + 32 + ew-resize_cursor_fallback + The "ew-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + ew-resize_cursor_image_fallback + An image cursor falling back to the "ew-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/ns_resize_cursor.png + + + + + ns-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + ns-resize_cursor + The "ns-resize" named cursor. + + + + + 32 + 32 + ns-resize_cursor_image + An image cursor. + + + + + 32 + 32 + ns-resize_cursor_fallback + The "ns-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + ns-resize_cursor_image_fallback + An image cursor falling back to the "ns-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/nesw_resize_cursor.png + + + + + nesw-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + nesw-resize_cursor + The "nesw-resize" named cursor. + + + + + 32 + 32 + nesw-resize_cursor_image + An image cursor. + + + + + 32 + 32 + nesw-resize_cursor_fallback + The "nesw-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + nesw-resize_cursor_image_fallback + An image cursor falling back to the "nesw-resize" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/nwse_resize_cursor.png + + + + + nwse-resize + start + baseline + 0.0 + True + + + + + 32 + 32 + nwse-resize_cursor + The "nwse-resize" named cursor. + + + + + 32 + 32 + nwse-resize_cursor_image + An image cursor. + + + + + 32 + 32 + nwse-resize_cursor_fallback + The "nwse-resize" named cursor falling back to an image cursor. + + + + + 32 + 32 + nwse-resize_cursor_image_fallback + An image cursor falling back to the "nwse-resize" cursor. + + + + + + + + + + + + + True + + + none + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/zoom_in_cursor.png + + + + + zoom-in + start + baseline + 0.0 + True + + + + + 32 + 32 + zoom-in_cursor + The "zoom-in" named cursor. + + + + + 32 + 32 + zoom-in_cursor_image + An image cursor. + + + + + 32 + 32 + zoom-in_cursor_fallback + The "zoom-in" named cursor falling back to an image cursor. + + + + + 32 + 32 + zoom-in_cursor_image_fallback + An image cursor falling back to the "zoom-in" cursor. + + + + + + + + + False + + + horizontal + 10 + 10 + + + resource:///cursors/zoom_out_cursor.png + + + + + zoom-out + start + baseline + 0.0 + True + + + + + 32 + 32 + zoom-out_cursor + The "zoom-out" named cursor. + + + + + 32 + 32 + zoom-out_cursor_image + An image cursor. + + + + + 32 + 32 + zoom-out_cursor_fallback + The "zoom-out" named cursor falling back to an image cursor. + + + + + 32 + 32 + zoom-out_cursor_image_fallback + An image cursor falling back to the "zoom-out" cursor. + + + + + + + + + + + + + + + + diff --git a/demos/gtk-demo/demo.gresource.xml b/demos/gtk-demo/demo.gresource.xml index 64b01a4648..c3aef049d0 100644 --- a/demos/gtk-demo/demo.gresource.xml +++ b/demos/gtk-demo/demo.gresource.xml @@ -57,6 +57,7 @@ reset.css + cursors.ui alias_cursor.png all_scroll_cursor.png cell_cursor.png @@ -67,6 +68,7 @@ default_cursor.png e_resize_cursor.png ew_resize_cursor.png + gtk_logo_cursor.png grabbing_cursor.png grab_cursor.png hand_cursor.png diff --git a/demos/gtk-demo/gtk_logo_cursor.png b/demos/gtk-demo/gtk_logo_cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..b25dcb1cb8cbcb1d629bf8f67412f7474f9a1f9b GIT binary patch literal 1414 zcmV;11$p|3P)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L00}w(00}w)@MMxo00007bV*G`2iO7< z4Kox}0NRKE00jm~L_t(o!@XB)Y!p=#{_dUGoqe=j%C_AKXj_mHOn7KqKqy*EjbMUc z6JktAKojF5QdDB%Bh~;B{uo3O2#tx+7$OEpeSnEUK?vH?CL#zV1tl$QrQ7aqyWQ>X z?9AMI{9$Rg(ynY-dw$M6=X~Ei&pSXCgoyHqC=Zh*M5Gc?MQ=pkAB`I~B5^&T8<^~6njzC0rG@R|i(m7uI(i+0ERb}Q(pF6B7e2r#P z&fXCLBJw0n`M4z7W(ipkiJMw?pYA@?*ugA8qjYZ)004(g!OJUW4SI964u@S?4gid? z;C~VzA_c%A-4wfpppt|koZbDp>u_VI8cmpKZ;?virW8+c(DRSY92kPxImK=JfH5Y< zBtS%*q_ldYhIQa{yR9pf0A-NJu?VEf#z#xdnZ-GMD(CAQcI9;H86OIfq;NPfHPXZV z)0_rnxoAH<*=BqH@a3YOi2hw7X|)nj@hAcSK!#xi%E}afvXgIrvdprpJgX#RyHZX>U*G($j>Li!q(pGpGF7XpvbG;OEb7k&m1}{)tPptOfxA%Zb5T*g6aW?t zrJjutU`!6PJ#j+qy>BjFXlW5mK20=S2-`CSd}{G@l=++j06ckuLgK2plx*M){l{!u z3eOEeG8!F$6p?`d0;Q#j|I8Vhv;1y-S7X>=SaMvz=~JD^b*fnVP?6PP_Ct=^?XaOqMt|Fh5d_SLIJeN#xe7KjZWE1Y3Txfd(%_X?(( z=$9SxXmo?EBh~^5p=30OL@3mK!|U~pr>GPcqoAclG>0K{uB!fWmt=~;LgE@-N_?X> zCqB9D^t|Wm0_U9ly9i}EBhlTBKuL+RIGNyWqEXiOZ&qWn2LQ0h`P_tyGc_+3v)e(2 zF}}8xu#!>vdGr}2TkV}Fc<|4C8_Og{Rk6fl;&U88)Z1OQNKUxKMh848uTxX12C zW4s<+=5G@uzWHYLB>LBT#cf^l_JH}ECj*ft) zEp%_%B=sXlc(kq#pouSK0^xXUD+<-w0D!fgJvbiSia{AlDLJN(>H^03eyy^yU53N@ zoq(rGuXPo@)>V8P*@8;<8>n#Aj^Boiv3Gf1-t7DX2ijfh*AHg1)dWl&i@u5LRugJG zd&ivvV2lZ#mp9k5Z{MFewY3A;?s*0#XKPi-@ka6Rjs~zm#9~dnprCx9t}cI~fOh5r z04#JqJy@Ol4p(3cDa__)jCGGoV0ioGzRcXb0IwD{TW|TU#GTypw#IXdY+Nh49q`O5IT&1Rwzo$u zBQACZ=Fnfp1vx0fx+xQVmNcp+Wpl}afrq6O(vWez&$_;sh^9~a`W*Tdw`I%U-%H~{ Ub(bcm$N&HU07*qoM6N<$f<;%3E&u=k literal 0 HcmV?d00001 -- 2.30.2